* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    color: #333;
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* 顶部区域 */
.header {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}
.header h1 {
    margin: 0;
    font-size: 24px;
}
/* 主内容区域 */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}
/* 左侧菜单 */
.sidebar {
    width: 250px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 15px 0;
}
.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}
.menu-item:hover {
    background-color: #f8f9fa;
}
.menu-item.active {
    background-color: #3498db;
    color: white;
}
.sub-menu {
    background-color: #f5f5f5;
    display: none;
}
.sub-menu.show {
    display: block;
}
.sub-menu-item {
    padding: 10px 20px 10px 40px;
    cursor: pointer;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}
.sub-menu-item:hover {
    background-color: #e8e8e8;
}
.sub-menu-item.active {
    background-color: #3498db;
    color: white;
}
.menu-toggle {
    float: right;
    transition: transform 0.3s ease;
}
.menu-toggle.rotate {
    transform: rotate(90deg);
}
/* 右侧内容区域 */
.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fafafa;
}
.content-section {
    display: none;
    position: relative;
}
.content-section.active {
    display: block;
}
.welcome-section.active {
    display: flex !important;
}
.welcome-section {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
}
.welcome-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    width: 100%;
}
.welcome-section p {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}
/* 工具容器 */
.tool-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.tool-container h2 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}
/* 表单元素样式 */
input, select, button, textarea {
    padding: 10px 15px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
input, select {
    width: 100%;
    max-width: 400px;
}
textarea {
    width: 80%;
    max-width: none;
}
button {
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    padding: 10px 20px;
}
button:hover {
    background-color: #2980b9;
}
/* 结果区域 */
.result {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    border-radius: 4px;
}

/* JSON格式化样式 */
.json-container {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.json-line {
    display: flex;
    align-items: flex-start;
    min-height: 20px;
    transition: background-color 0.2s;
}

.json-line:hover {
    background-color: #f0f8ff;
}

.json-toggle {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    margin-right: 4px;
    background-color: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    color: #1976d2;
}

.json-toggle:hover {
    background-color: #bbdefb;
}

.json-content {
    flex: 1;
    white-space: pre-wrap;
    word-break: break-all;
}

/* JSON语法高亮 */
.json-key {
    color: #881391;
    font-weight: bold;
}

.json-string {
    color: #c41a16;
}

.json-number {
    color: #1c00cf;
}

.json-boolean {
    color: #0d22aa;
    font-weight: bold;
}

.json-null {
    color: #808080;
    font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    .header h1 {
        font-size: 20px;
    }
    
    .json-container {
        font-size: 12px;
    }
    
    .json-toggle {
        width: 14px;
        height: 14px;
        line-height: 14px;
        font-size: 10px;
    }
}